import request from '@/utils/request'

// 根据参数查询热销特惠列表和分页数据
export function page(pageParam) {
  return request({
    url: '/gscloud_product/admin/label/page',
    method: 'get',
    params: pageParam
  })
}

export function get(labelId) {
  return request({
    url: '/gscloud_product/admin/label',
    method: 'get',
    params: {
      labelId
    }
  })
}

export function save(data) {
  return request({
    url: '/gscloud_product/admin/label',
    method: 'post',
    data
  })
}

export function update(data) {
  return request({
    url: '/gscloud_product/admin/label',
    method: 'put',
    data
  })
}

export function deleteById(labelId) {
  return request({
    url: '/gscloud_product/admin/label',
    method: 'delete',
    params: {
      labelId
    }
  })
}
